/**
 * 
 */
package com.gr.staffpm;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author Graham Rhodes 25 Mar 2011 20:02:46
 */
public class StaffPMEntryPoint {

    private static Logger log = LoggerFactory.getLogger(StaffPMEntryPoint.class);

    public static void main(String[] args) {
        try {
            Server server = new Server(9090);

            WebAppContext context = new WebAppContext();
            context.setDescriptor("src/main/webapp/WEB-INF/web.xml");
            context.setResourceBase("src/main/webapp");
            context.setContextPath("/");
            context.setParentLoaderPriority(true);
            server.setHandler(context);

            server.start();
            server.join();
        } catch (Exception e) {
            log.error("Exception starting webapp", e);
        }
    }

}
